<%@page import="dier.xuanke"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"

    pageEncoding="UTF-8"%>
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>

         <title>顾客查询信息页</title>

</head>
<title>顾客查询信息页</title>
<style type="text/css">
   div {
    margin: 0 660px;
   }
   p {
    display: inline;
   }
   
   h2 {
    text-align: center;
    color: blue;
   }
   .xx{
    height: 1000px;
    width: 500;
    
   }
   
   .ys {
   Font-size:35px;
    color: red;
   }
 </style>
 <body>
 <div class="xx">
 <h1>顾客功能页</h1>
 <%
 String name=null;
 String olpwd=null;
 String newpwd=null;
 String repwd=null;
 try
 {name=request.getParameter("tid");}
 catch(Exception e){}
 try
 {olpwd=request.getParameter("olpwd");}
 catch(Exception e){}
 try
 {newpwd=request.getParameter("newpwd");}
 catch(Exception e){}
 try
 {repwd=request.getParameter("repwd");}
 catch(Exception e){}
 out.print(name);
 if(!newpwd.equals(repwd))
 {
	 %>
	 <script type="text/javascript" >
	 alert("错误:两次输入新密码不一致。");         //弹出提示框输出错误信息
	 window.location='yonghuxiugai.jsp' ;     //跳转到注测界面
	 </script>
	 <%
 }
 xuanke zf=new xuanke();
int i=zf.Teaxiugaimm(name, olpwd, newpwd);
 if(i==0)
 {
	 %>
	 <script type="text/javascript" >
	 alert("错误:旧密码输入错误。");         //弹出提示框输出错误信息
	 window.location='yonghuxiugai.jsp' ;     //跳转到注测界面
	 </script>
	 <%
 }
 
 else
 {
	 %>
	 <script type="text/javascript" >
	 alert("修改成功,将重新登录");         //弹出提示框输出错误信息
	 window.location='login.jsp' ;     //跳转到注测界面
	 </script>
	 <%
 }

 %>
 </div>
 </body>
</html>